package org.example.demo20240504.service;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.example.demo20240504.module.GoodsOrderMapper;
import org.example.demo20240504.mq.dto.OrderDTO;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @ClassName DemoService
 * @Description TODO
 * @Author huarujin
 * @Date 2024/5/4 14:42
 * @Version 1.0
 */

@Service
@Slf4j
@RequiredArgsConstructor
public class DemoService {

    private final GoodsOrderMapper goodsOrderMapper;

    public void subOrder(OrderDTO orderDTO) {
        goodsOrderMapper.subNum(orderDTO.getId(), orderDTO.getNum());
    }

}
